package com.hibernate;

import java.util.ArrayList;
import java.util.List;

public class AccountStatement {

	private long id;
	private Account account;
	private List<Transaction> transactions;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	public Account getAccount() {
		return account;
	}
	
	public void setAccount(Account account) {
		this.account = account;
	}
	
	public List<Transaction> getTransactions() {
		return transactions;
	}
	
	public boolean addTransaction(Transaction transaction) {
		if(transactions == null) {
			transactions = new ArrayList<Transaction>();
		}
		return transactions.add(transaction);
	}

	public void setTransactions(List<Transaction> transactions) {
		this.transactions = transactions;
	}
}
